package com.ep.framelibrary.mvp;

import com.ep.baselibrary.base.BaseFragment;

/**
 * Created by Administrator on 2017/7/4.
 */

public abstract class FrameMvpFragment<P extends BasePresent> extends BaseFragment {
    protected P mPresent;
    @Override
    protected void initBeforView() {
        mPresent=createPresent();
        mPresent.attach((IBaseView) this);
    }

    @Override
    public void onDetach() {
        super.onDetach();
        mPresent.detach((IBaseView) this);
    }

    protected abstract P createPresent();
}
